import shutil
import subprocess
from pathlib import Path
gitCmd = subprocess.run(["pip", "show", "pyftpdlib"],
                        universal_newlines=True, capture_output=True, check=True)
gitStdout = gitCmd.stdout.split("\n")
locStr = next(filter(lambda x: "Location" in x, gitStdout))
# pyLibPath = Path(locStr.split(": ")[1])
pyLibPath = Path(locStr.split(": ")[1])
print(pyLibPath)
choice = input("correct Folder?[y/n]:") or "n"
src = Path().resolve() / "pyftpdlib.zip"
# dst = Path().resolve() / "tmp/"
if choice == "y":
    print("start copying:\n", shutil.copy2(
        src, pyLibPath))
else:
    print("nothing changed.")
